var httpUtil = {};


httpUtil.post = function (url, data, func) {
    $.ajax({
        url: url,
        type: "POST",
        processData: false,
        contentType: "application/x-www-form-urlencoded; charset=UTF-8",
        data: data,
        success: function (data) {
            tipUtil.json2TipWithFunc(data, func);
        },
        error: function () {
            tipUtil.tip('请求失败');
        }
    });
};

httpUtil.get = function (url, func) {
    $.ajax({
        url: url,
        type: "GET",
        contentType: "application/x-www-form-urlencoded; charset=UTF-8",
        success: function (data) {
            tipUtil.json2TipWithFunc(data, func);
        },
        error: function () {
            tipUtil.tip('请求失败');
        }
    });
};